<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
<link rel="stylesheet" type="text/css" href="template/default/content/css/style.css">
<script language="javascript" type="text/javascript" src="DatePicker/WdatePicker.js"></script>
<script src="template/default/tree/js/admincp.js?SES" type="text/javascript"></script>
<script charset="utf-8" src="eweb/kindeditor.js"></script>
<title>Office 515158 2011 OA办公系统</title>
 
</head>
<body>
<? if($do!='word'){?>
<table width="90%" border="0" align="center" cellpadding="3" cellspacing="0" class="small">
  <tr>
    <td class="Big"><img src="template/default/content/images/notify_new.gif" align="absmiddle"><span class="big3"> 查看审批流程</span>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="#" onClick="window.print()" style="font-size:12px;">打印工作流程</a>
    </td>
  </tr>
</table>
<? }?>
<form name="save" method="post" action="#">

<table class="TableBlock" border="0" width="90%" align="center">
<?php
//获取固定流程
if($tpl['tmpytpe']=='2'){
	echo '<tr><td nowrap class="TableHeader" colspan="4"><b>&nbsp;流程办理进度</b>';
	if($blog["type"]=='1'){
		echo '[己结束]';
	}
	echo '</td></tr>';
	//输入第一步流程
	echo '<tr><td width="100" align="center" nowrap class="TableContent">'; 
	echo '第<span style="font-size:16px; color:#FF0000; font-weight:900;">1</span>步：';
	echo '</td><td colspan="3" class="TableData">';
    echo '['.GET_INC_USER_NAME($blog["uid"]).'] 填写流程申请</td></tr>';
	//读取流程节点
	global $db;
	$sql="SELECT * FROM ".DB_TABLEPRE."workclass_flow where template_id='".$tpl["id"]."' and number>1 and unionid='".union_id."' ORDER BY number Asc";
	$query = $db->query($sql);
	while ($row = $db->fetch_array($query)) {
		//读取当前流程节点
		$pers = $db->fetch_one_array("SELECT * FROM ".DB_TABLEPRE."workclass_personnel  WHERE flowid = '".$row['id']."'");
		echo '<tr><td width="100" align="center" nowrap class="TableContent"> '; 
		echo '第<span style="font-size:16px; color:#FF0000; font-weight:900;">';
		echo $row['number'].'</span>步：</td>';
		echo '<td colspan="3" class="TableData"><b>'.$row['title'].'</b><br>';
		if($pers['id']!=''){
			if($pers['type']=='3'){
				echo '等待该节点人员办理！';
			}elseif($pers['type']=='2'){
				echo '己被['.$pers['name'].']拒绝<br>';
				echo '拒绝时间：'.$pers['approvaldate'].'<br>';
				echo '拒绝原因：'.$pers['lnstructions'].'';
			}else{
				echo '审批人：'.$pers['name'].'<br>';
				echo '审批时间：'.$pers['approvaldate'].'<br>';
				echo '批示：'.$pers['lnstructions'].'';
			}	
		}
		echo '</td></tr>';
	}
	
	
}else{
	echo '<tr><td nowrap class="TableHeader" colspan="4"><b>&nbsp;流程办理进度</b> ';
	if($blog["type"]=='1'){
		echo '[己结束]';
	}
	echo '</td> </tr><tr><td width="100" align="center" nowrap class="TableContent">  ';
	echo '第<span style="font-size:16px; color:#FF0000; font-weight:900;">1</span>步：	  ';
	echo '</td><td colspan="3" class="TableData"><b>自由流程</b><br>['.GET_INC_USER_NAME($blog["uid"]).'] 填写流程申请 </td></tr>';
	global $db;
	$query = $db->query("SELECT * FROM ".DB_TABLEPRE."workclass_personnel where workclassid='".$blog["id"]."' ORDER BY id Asc");
	$i=1;
	while ($row = $db->fetch_array($query)) {
	$i++;
	echo '<tr><td width="100" align="center" nowrap class="TableContent">';
	echo '第<span style="font-size:16px; color:#FF0000; font-weight:900;">'.$i.'</span>步：';
	echo '</td><td colspan="3" class="TableData">';
	if($row["flag"]!=''){
		echo '<b>流程监控设置</b><br>';
	}else{
		echo '<b>自由流程</b><br>';
	}
	if($row["type"]=='3'){
	echo '等待该节点人员办理！';
	}elseif($row['type']=='2'){
	echo '己被['.$row['name'].']拒绝<br>';
	echo '拒绝时间：'.$row['approvaldate'].'<br>';
	echo '拒绝原因：'.$row['lnstructions'].'';
	}else{
	echo '审批人：'.$row['name'].'<br>';
	echo '审批时间：'.$row['approvaldate'].'<br>';
	echo '批示：'.$row['lnstructions'].'';
	}
    echo '</td></tr>';
	}
}
?>
  </table>
</form>


 
</body>
</html>
